package com.qianyu.api.controller.front;

import com.qianyu.core.entity.base.Result;
import com.qianyu.core.entity.bean.GameArea;
import com.qianyu.core.service.GameAreaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "前台管理-游戏区服", description = "wangzhicheng")
@RestController
@RequestMapping("/front/gameArea")
@RequiredArgsConstructor
public class GameAreaController {

    private final GameAreaService gameAreaService;

    /**
     * 根据活动appid获取游戏区服
     */
    @GetMapping("/listGameArea")
    @ApiOperation(value = "根据活动appid获取游戏区服")
    Result<List<GameArea>> listGameArea(@RequestParam String appid) {
        return Result.success(gameAreaService.listGameArea(appid));
    }
}
